package com.whw.fy.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.whw.fy.entity.Message;
import com.whw.fy.service.CountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = " 统计模块")
@RestController
@RequestMapping("/api/count")
public class CountController {
    @Resource
    private CountService countService;

    /**
     * 统计月
     * @param teacherId
     * @return
     */
    @ApiOperation(value = "根据老师id统计工作情况（本月随时）")
    @GetMapping("/countTeacherIdWorkingConditions")
    public Message CountTeacherIdWorkingConditions(int teacherId){
        return countService.CountTeacherIdWorkingConditions(teacherId);
    }
    @ApiOperation(value = "统计所有老师本月工作情况（本月随时）")
    @GetMapping("/countAllTeacherWorkingConditionsInMonth")
    public Message countAllTeacherWorkingConditionsInMonth(){
        return countService.countAllTeacherWorkingConditionsInMonth();
    }

    @ApiOperation(value = "缴费金额统计（本月随时）")
    @GetMapping("/countAllStudentPayInMonth")
    @ApiOperationSupport(ignoreParameters = {"PaymentAmountStatisticsPayTypeId","studentId","lessonId","student","lesson"})
    public Message countAllStudentPayInMonth(){
        return countService.countAllStudentPayInMonth();
    }


    @ApiOperation(value = "剩余课时统计（时时）")
    @GetMapping("/countAllStudentRemainingClassHoursStatisticsInMonth")
    public Message countAllStudentRemainingClassHoursStatisticsInMonth(){
        return countService.countAllStudentRemainingClassHoursStatisticsInMonth();
    }

    /**
     * 未完成，需要向人家发出提问：1.统计哪些权限等级的用户？ 2.教学记录次数是啥？
     * @return
     */
    @ApiOperation(value = "教学管理次数统计（本月随时）（每月数据留存记录）")
    @GetMapping("/countAllTeachingManagementTimesStatisticsInMonth")
    public Message countAllTeachingManagementTimesStatisticsInMonth(){
        return countService.countAllTeachingManagementTimesStatisticsInMonth();
    }

    @ApiOperation(value = "学员统计（本月随时）（每月数据留存记录）")
    @GetMapping("/countAllStudentStatusStatisticsInMonth")
    public Message countAllStudentStatusStatisticsInMonth(){
        return countService.countAllStudentStatusStatisticsInMonth();
    }
}
